package com.tinyspot.concrete.eureka.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author Tinyspot
 * @date 2022-12-24 20:59
 */
@RestController
public class ClientController {

    @Value("${server.port}")
    private String port;

    @RequestMapping("/show")
    public String show(String message) {
        System.out.println("port: " + port + "; message: " + message);
        // try {
        //     TimeUnit.SECONDS.sleep(5);
        // } catch (InterruptedException e) {
        //
        // }
        return "port: " + port + "; message: " + message;
    }
}
